3.9.26 \(\int \frac {-2+7 x}{42-16 x+2 x^2} \, dx\)

Optimal. Leaf size=33 \[ \frac {7}{4} \log \left (x^2-8 x+21\right )-\frac {13 \tan ^{-1}\left (\frac {4-x}{\sqrt {5}}\right )}{\sqrt {5}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {634, 618, 204, 628} \begin {gather*} \frac {7}{4} \log \left (x^2-8 x+21\right )-\frac {13 \tan ^{-1}\left (\frac {4-x}{\sqrt {5}}\right )}{\sqrt {5}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2 + 7*x)/(42 - 16*x + 2*x^2),x]

[Out]

(-13*ArcTan[(4 - x)/Sqrt[5]])/Sqrt[5] + (7*Log[21 - 8*x + x^2])/4

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {-2+7 x}{42-16 x+2 x^2} \, dx &=\frac {7}{4} \int \frac {-16+4 x}{42-16 x+2 x^2} \, dx+26 \int \frac {1}{42-16 x+2 x^2} \, dx\\ &=\frac {7}{4} \log \left (21-8 x+x^2\right )-52 \operatorname {Subst}\left (\int \frac {1}{-80-x^2} \, dx,x,-16+4 x\right )\\ &=-\frac {13 \tan ^{-1}\left (\frac {4-x}{\sqrt {5}}\right )}{\sqrt {5}}+\frac {7}{4} \log \left (21-8 x+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 35, normalized size = 1.06 \begin {gather*} \frac {1}{2} \left (\frac {7}{2} \log \left (x^2-8 x+21\right )+\frac {26 \tan ^{-1}\left (\frac {x-4}{\sqrt {5}}\right )}{\sqrt {5}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2 + 7*x)/(42 - 16*x + 2*x^2),x]

[Out]

((26*ArcTan[(-4 + x)/Sqrt[5]])/Sqrt[5] + (7*Log[21 - 8*x + x^2])/2)/2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {-2+7 x}{42-16 x+2 x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(-2 + 7*x)/(42 - 16*x + 2*x^2),x]

[Out]

IntegrateAlgebraic[(-2 + 7*x)/(42 - 16*x + 2*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 26, normalized size = 0.79 \begin {gather*} \frac {13}{5} \, \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} {\left (x - 4\right )}\right ) + \frac {7}{4} \, \log \left (x^{2} - 8 \, x + 21\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2+7*x)/(2*x^2-16*x+42),x, algorithm="fricas")

[Out]

13/5*sqrt(5)*arctan(1/5*sqrt(5)*(x - 4)) + 7/4*log(x^2 - 8*x + 21)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 26, normalized size = 0.79 \begin {gather*} \frac {13}{5} \, \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} {\left (x - 4\right )}\right ) + \frac {7}{4} \, \log \left (x^{2} - 8 \, x + 21\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2+7*x)/(2*x^2-16*x+42),x, algorithm="giac")

[Out]

13/5*sqrt(5)*arctan(1/5*sqrt(5)*(x - 4)) + 7/4*log(x^2 - 8*x + 21)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 29, normalized size = 0.88 \begin {gather*} \frac {13 \sqrt {5}\, \arctan \left (\frac {\left (2 x -8\right ) \sqrt {5}}{10}\right )}{5}+\frac {7 \ln \left (x^{2}-8 x +21\right )}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-2+7*x)/(2*x^2-16*x+42),x)

[Out]

7/4*ln(x^2-8*x+21)+13/5*5^(1/2)*arctan(1/10*(2*x-8)*5^(1/2))

________________________________________________________________________________________

maxima [A]  time = 1.36, size = 26, normalized size = 0.79 \begin {gather*} \frac {13}{5} \, \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} {\left (x - 4\right )}\right ) + \frac {7}{4} \, \log \left (x^{2} - 8 \, x + 21\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2+7*x)/(2*x^2-16*x+42),x, algorithm="maxima")

[Out]

13/5*sqrt(5)*arctan(1/5*sqrt(5)*(x - 4)) + 7/4*log(x^2 - 8*x + 21)

________________________________________________________________________________________

mupad [B]  time = 1.17, size = 30, normalized size = 0.91 \begin {gather*} \frac {7\,\ln \left (x^2-8\,x+21\right )}{4}+\frac {13\,\sqrt {5}\,\mathrm {atan}\left (\frac {\sqrt {5}\,x}{5}-\frac {4\,\sqrt {5}}{5}\right )}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((7*x - 2)/(2*x^2 - 16*x + 42),x)

[Out]

(7*log(x^2 - 8*x + 21))/4 + (13*5^(1/2)*atan((5^(1/2)*x)/5 - (4*5^(1/2))/5))/5

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 39, normalized size = 1.18 \begin {gather*} \frac {7 \log {\left (x^{2} - 8 x + 21 \right )}}{4} + \frac {13 \sqrt {5} \operatorname {atan}{\left (\frac {\sqrt {5} x}{5} - \frac {4 \sqrt {5}}{5} \right )}}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2+7*x)/(2*x**2-16*x+42),x)

[Out]

7*log(x**2 - 8*x + 21)/4 + 13*sqrt(5)*atan(sqrt(5)*x/5 - 4*sqrt(5)/5)/5

________________________________________________________________________________________